package com.luckmgr.service.impl;


import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.common.service.BaseService;
import com.luckmgr.dao.PrizeMapper;
import com.luckmgr.entity.db.Prize;
import com.luckmgr.service.LevelPrizeService;
import com.luckmgr.service.PrizeService;


@Service
public class PrizeServiceImpl  extends BaseService<Prize>  implements PrizeService {
	
	@Autowired
	LevelPrizeService levelPrizeServiceImpl;

	 PrizeMapper prizeMapper;
	
	@Resource(name="prizeMapper")
    public void initCompanyMapper(PrizeMapper  prizeMapper) {
		this.prizeMapper = prizeMapper;
        super.setBaseDao(prizeMapper);
    }

	@Override
	public void deletePrize(Integer id) {
		// TODO Auto-generated method stub
		levelPrizeServiceImpl.deleteByPrizeid(id);
		prizeMapper.deleteByPrimaryKey(id);
	}
}